git clone https://github.com/fluent/fluentd.git
cd fluentd
/usr/local/ruby/bin/bundle install
PATH=/usr/local/ruby/bin:$PATH /usr/local/ruby/bin/bundle exec rake build
/usr/local/ruby/bin/gem install pkg/fluentd-1.4.0.gem